package manage.modules.dept.service;

import java.util.List;

import manage.commons.utils.Pager;
import manage.modules.dept.model.Dept;
import manage.modules.dept.model.GroupOfDept;

/**
 * Description：部门职能
 * 
 * @author:董吉
 * @since：2012-07-27
 */
public interface DeptService {

	Dept select(Long deptId);

	int insert(Dept dept);

	int update(Dept dept);

	int delete(Long deptId);

	/**
	 * 查询所有部门,带1小时缓存
	 * 
	 * @return
	 * @throws Exception
	 */
	List<Dept> listAll();

	List<Dept> listDeptByGroupId(Long groupId);

	boolean exists(Long deptId);

	boolean groupVested(Long deptId);

	List<Dept> listByAbility(int ability);

	Long getCountOfAll();

	void query(Dept dept, Pager<Dept> pager);

	int insert(GroupOfDept groupOfDept);

	void insertGroupOfDepts(Long groupId, List<Long> deptIds);

	int delete(GroupOfDept groupOfDept);

	void deleteGroupOfDepts(Long groupId, List<Long> deptIds);
}
